package com.example.serviceribbon.service;


import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class LoginService {
    @Autowired
    RestTemplate restTemplate;

    public JSONObject getLogin(String name, String pwd){
        return restTemplate.getForObject("http://service-login/user/login?name=" + name + "&pwd=" + pwd, JSONObject.class);
    }
}
